﻿<UserControl x:Class="SoftTeach.View.Personen.MetroGruppenPrintView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             Name="ParentUserControl"
             mc:Ignorable="d" Width="750" Height="300">
  <UserControl.Resources>
    <ResourceDictionary>
      <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="/SoftTeach;component/Resources/MetroResources.xaml"/>
      </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
  </UserControl.Resources>
  <Grid Margin="60,60">
    <Grid.RowDefinitions>
      <RowDefinition Height="*"/>
      <RowDefinition Height="Auto"/>
    </Grid.RowDefinitions>
    <ListBox Grid.Column="0" Grid.Row="0"
                 ItemsSource="{Binding Path=MetroGruppenView}"             
                 BorderThickness="0"
                 Name="GruppenListBox"
                 ItemTemplate="{StaticResource MetroPrintSchülereintragGruppenView}"
                 ItemContainerStyle="{StaticResource UnselectableListBoxItem}">
      <ListBox.ItemsPanel>
        <ItemsPanelTemplate>
          <StackPanel/>
        </ItemsPanelTemplate>
      </ListBox.ItemsPanel>
      <ListBox.GroupStyle>
        <GroupStyle ContainerStyle="{StaticResource MetroPrintGruppenGroupHeaderStyle}">
          <GroupStyle.Panel>
            <ItemsPanelTemplate>
              <WrapPanel Orientation="Horizontal" Width="{Binding ActualWidth, ElementName=GruppenListBox}"/>
            </ItemsPanelTemplate>
          </GroupStyle.Panel>
        </GroupStyle>
      </ListBox.GroupStyle>
    </ListBox>
  </Grid>
</UserControl>
